from app import app
import os
from werkzeug.serving import run_simple

if __name__ == "__main__":
    app.debug = True #应用激活调试
    host = os.environ.get('IP', '127.0.0.1')
    port = int(os.environ.get('PORT', 5000))
    # app.run(host=host, port=port, debug = True)

    # 简易开发服务器  #激活调试
    run_simple('localhost', 5000, app,
               use_reloader=True, use_debugger=True, use_evalex=True)